package com.cms.recursoshumanos.handler;

import com.cms.recursoshumanos.activity.main.MainRecursosHumanosActivity;
import com.cms.recursoshumanos.cache.UserInfoCache;
import com.cms.recursoshumanos.constant.Constant;
import com.cms.recursoshumanos.facade.ListaEstudioActivityFacade;

public class ListaEstudioActivityHandler 
{
	

	public String facadeListaEstudioScreen(String username, String password)
	{
		ListaEstudioActivityFacade lista_estudio_facade = new ListaEstudioActivityFacade(username,
																						password);
		
		return lista_estudio_facade.enviarSolicitud();
		//lista_estudio_facade.run_facade(lista_estudio_facade);
	}
	public String refreshListaEstudio (String username, String password)
	{
		return this.facadeListaEstudioScreen(username, password);
	}
	public String getListaEstudio (String username, String password)
	{
		if ( UserInfoCache.getInstance().cache_utilizable(2, MainRecursosHumanosActivity.getAppContext())
				||	UserInfoCache.getInstance().lista_vacia(3))
		{
			return this.facadeListaEstudioScreen(username, password);
		}
		else
		{
			return Constant.CODE_OK;
		}
			
	}

	
}

